home *** CD-ROM | disk | FTP | other *** search
/ Sunday Savers: Singing Fun! / Sunday Savers: Singing Fun!.iso / mac / Xtras / Buddy API 3.7 / Buddy API Docs.swf / texts / 1134.txt < prev    next >
Encoding:
Text File  |  2004-08-31  |  2.5 KB  |  101 lines

  1. 32
  2. --- RECORDSEPARATOR ---
  3.  
  4. --- RECORDSEPARATOR ---
  5. Previous 
  6. --- RECORDSEPARATOR ---
  7. Platform:
  8. --- RECORDSEPARATOR ---
  9.  
  10. --- RECORDSEPARATOR ---
  11. Windows
  12. --- RECORDSEPARATOR ---
  13.  
  14. --- RECORDSEPARATOR ---
  15. Description:
  16. --- RECORDSEPARATOR ---
  17.  
  18. --- RECORDSEPARATOR ---
  19. baPrevious checks whether a previous instance of a projector or packaged file is 
  20. --- RECORDSEPARATOR ---
  21. running.
  22. --- RECORDSEPARATOR ---
  23.  
  24. --- RECORDSEPARATOR ---
  25. Usage:
  26. --- RECORDSEPARATOR ---
  27.  
  28. --- RECORDSEPARATOR ---
  29. Result = baPrevious( Activate )
  30. --- RECORDSEPARATOR ---
  31.  
  32. --- RECORDSEPARATOR ---
  33. Arguments:
  34. --- RECORDSEPARATOR ---
  35.  
  36. --- RECORDSEPARATOR ---
  37. Integer. 
  38. --- RECORDSEPARATOR ---
  39. If Activate is true, the previous instance is activated and brought to the front.
  40. --- RECORDSEPARATOR ---
  41.  
  42. --- RECORDSEPARATOR ---
  43. Returns:
  44. --- RECORDSEPARATOR ---
  45.  
  46. --- RECORDSEPARATOR ---
  47. Integer. 
  48. --- RECORDSEPARATOR ---
  49. Returns the window handle of the previous instance if one is running, else 0.
  50. --- RECORDSEPARATOR ---
  51.  
  52. --- RECORDSEPARATOR ---
  53. Examples:
  54. --- RECORDSEPARATOR ---
  55.  
  56. --- RECORDSEPARATOR ---
  57. Director: 
  58. --- RECORDSEPARATOR ---
  59. if baPrevious( true ) <> 0 then quit 
  60. --- RECORDSEPARATOR ---
  61. Authorware: 
  62. --- RECORDSEPARATOR ---
  63. if baPrevious( true ) <> 0 then quit(0)
  64. --- RECORDSEPARATOR ---
  65.  
  66. --- RECORDSEPARATOR ---
  67. Notes:
  68. --- RECORDSEPARATOR ---
  69.  
  70. --- RECORDSEPARATOR ---
  71. Both Director and Authorware open their display windows before scripts are 
  72. --- RECORDSEPARATOR ---
  73. executed. This means that the window of the second instance will appear before 
  74. --- RECORDSEPARATOR ---
  75. the previous one can be activated. 
  76. --- RECORDSEPARATOR ---
  77. Under Windows NT, this function will only find the first instance opened. For 
  78. --- RECORDSEPARATOR ---
  79. example, if you open three copies of a projector, then quit the f
  80. --- RECORDSEPARATOR ---
  81. irst one, baPrevious 
  82. --- RECORDSEPARATOR ---
  83. in the third projector will return 0 - it can not recognise the second projector as a 
  84. --- RECORDSEPARATOR ---
  85. previous instance. Under Windows 95 and 3.1, the third projector will be able to 
  86. --- RECORDSEPARATOR ---
  87. identify the second projector as a previous instance. 
  88. --- RECORDSEPARATOR ---
  89. If you are using a full screen Director projector, this script will activate the previous 
  90. --- RECORDSEPARATOR ---
  91. instance. The example given above will make the stage move to a new position. 
  92. --- RECORDSEPARATOR ---
  93. set wnd = baPrevious( false ) 
  94. --- RECORDSEPARATOR ---
  95. if wnd <> 0 then 
  96. --- RECORDSEPARATOR ---
  97. baWindowToFront( wnd ) 
  98. --- RECORDSEPARATOR ---
  99. quit 
  100. --- RECORDSEPARATOR ---
  101. end if